//
//  QRCodeController.m
//  MyNewWeiBo
//
//  Created by wpapple on 16/5/31.
//  Copyright © 2016年 heron. All rights reserved.
//

#import "QRCodeController.h"

@interface QRCodeController ()

@property (weak, nonatomic) IBOutlet UIImageView *animationsImageView;

@end

@implementation QRCodeController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    CADisplayLink * link = [CADisplayLink displayLinkWithTarget:self selector:@selector(move)];
    [link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
    link.frameInterval = 0.1;
    
    NSDictionary * dict = @{NSForegroundColorAttributeName:[UIColor orangeColor]};
    
//    [[UIApplication sharedApplication]setStatusBarHidden:YES];
    [self prefersStatusBarHidden];
    
    self.navigationController.navigationBar.titleTextAttributes = dict;
    [self.navigationController.navigationBar setBarTintColor:[UIColor blackColor]];
    
    self.tabBarController.tabBar.barTintColor = [UIColor blackColor];
}

- (IBAction)close:(UIBarButtonItem *)sender {
    
    [self dismissViewControllerAnimated:YES completion:nil];
    
}

- (void)move{
    self.animationsImageView.y += 3;
    
    if (self.animationsImageView.y >= (200-124)) {
        self.animationsImageView.y = -124;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
